package com.moss.cloud.base.api.model.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

@Data
public class FlowBusinessVO implements Serializable {
    public static final String DATE_FORMAT = "yyyy-MM-dd HH:mm:ss";
    private Long id;
    /**
     * 用户ID
     */
    private Long userId;
    /**
     * 租户ID
     */
    private Long tenantId;
    /**
     * 流程分组ID
     */
    private Long flowGroupId;
    /**
     * 模型表单原始数据
     */
    private String originalFormData;
    /**
     * 模型表单数据
     */
    private String formData;
    /**
     * 流程状态（1:进行中,2:已通过,3:已驳回）
     */
    private Integer flowStatus;
    /**
     * 流程模型ID
     */
    private Long flowModelId;
    /**
     * 流程模型名称
     */
    private String flowModelName;
    /**
     * 流程分组名称
     */
    private String groupName;
    /**
     * 创建时间
     */
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonFormat(pattern = DATE_FORMAT)
    private LocalDateTime createdTime;
    /**
     * 流程任务
     */
    private List<FlowTaskVO> nodeTasks;
}
